#include "itemmodel.h"

ItemModel::ItemModel()
{
    this->name = "Nissan MR";
    this->code = "M9R Turbo Diesel";
    this->supplier = new SupplierModel;
    this->srp = 39000.50f;
    this->numStocks = 1;
    this->active = true;
}

QString ItemModel::getName()
{
    return this->name;
}

void ItemModel::setName(QString name)
{
    this->name = name;
}

QString ItemModel::getCode()
{
    return this->code;
}

void ItemModel::setCode(QString code)
{
    this->code = code;
}

SupplierModel *ItemModel::getSupplier()
{
    return this->supplier;
}

void ItemModel::setSupplier(SupplierModel *supplier)
{
    this->supplier = supplier;
}

float ItemModel::getSrp()
{
    return this->srp;
}

void ItemModel::setSrp(float srp)
{
    this->srp = srp;
}

int ItemModel::getNumStocks()
{
    return this->numStocks;
}

void ItemModel::setNumStocks(int numStocks) {
    this->numStocks = numStocks;
}

void ItemModel::setActive(bool active)
{
    this->active = active;
}

bool ItemModel::isActive()
{
    return this->active;
}
